]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/theme-node-transition: Pass actor when constructing timeline
authorJonas Ådahl <jadahl@gmail.com>
Tue, 21 Apr 2020 16:50:15 +0000 (18:50 +0200)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 2 Jul 2020 20:50:03 +0000 (20:50 +0000)
Timelines now take an actor, to be able to derive an appropriate frame
clock, so pass the one of the actor we're transitioning on.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1299

src/st/st-theme-node-transition.c
src/st/st-theme-node-transition.h
src/st/st-widget.c

index 42232bd2dd39ea2a0d1d4d63f7ee9ff814489c53..b7366653d4ac8d94bde360e03d3b1d071189f518 100644 (file)
@@ -84,10 +84,11 @@ on_timeline_new_frame (ClutterTimeline       *timeline,
 }
 
 StThemeNodeTransition *
-st_theme_node_transition_new (StThemeNode *from_node,
-                              StThemeNode *to_node,
+st_theme_node_transition_new (ClutterActor          *actor,
+                              StThemeNode           *from_node,
+                              StThemeNode           *to_node,
                               StThemeNodePaintState *old_paint_state,
-                              guint        duration)
+                              unsigned int           duration)
 {
   StThemeNodeTransition *transition;
   g_return_val_if_fail (ST_IS_THEME_NODE (from_node), NULL);
@@ -103,7 +104,7 @@ st_theme_node_transition_new (StThemeNode *from_node,
   st_theme_node_paint_state_copy (&transition->priv->old_paint_state,
                                   old_paint_state);
 
-  transition->priv->timeline = clutter_timeline_new (duration);
+  transition->priv->timeline = clutter_timeline_new_for_actor (actor, duration);
 
   transition->priv->timeline_completed_id =
     g_signal_connect (transition->priv->timeline, "completed",
index 61f82d295fd1972ad1eb0d5ec5ec56bfda8326e0..e7420e6d5395e54d89efffbfd05a15e7642c4901 100644 (file)
@@ -32,10 +32,11 @@ G_BEGIN_DECLS
 G_DECLARE_FINAL_TYPE (StThemeNodeTransition, st_theme_node_transition,
                       ST, THEME_NODE_TRANSITION, GObject)
 
-StThemeNodeTransition *st_theme_node_transition_new (StThemeNode *from_node,
-                                                     StThemeNode *to_node,
+StThemeNodeTransition *st_theme_node_transition_new (ClutterActor          *actor,
+                                                     StThemeNode           *from_node,
+                                                     StThemeNode           *to_node,
                                                      StThemeNodePaintState *old_paint_state,
-                                                     guint        duration);
+                                                     guint                  duration);
 
 void  st_theme_node_transition_update   (StThemeNodeTransition *transition,
                                          StThemeNode           *new_node);
index 6fd7a11a9d04adefc2b096cb34298a87263ef7c0..29ed553370d45c784fceceaf70f076181c108576 100644 (file)
@@ -1687,7 +1687,8 @@ st_widget_recompute_style (StWidget    *widget,
            */
 
           priv->transition_animation =
-            st_theme_node_transition_new (old_theme_node,
+            st_theme_node_transition_new (CLUTTER_ACTOR (widget),
+                                          old_theme_node,
                                           new_theme_node,
                                           current_paint_state (widget),
                                           transition_duration);